package com.lzj.demo.design.dto;

public class Order {
    public void checkNullParam(Object param) {
        //参数非空校验
        throw new RuntimeException();
    }

    public void checkSecurity() {
        //安全校验
        throw new RuntimeException();
    }

    public void checkBackList() {
        //黑名单校验
        throw new RuntimeException();
    }

    public void checkRule() {
        //规则拦截
        throw new RuntimeException();
    }
    /**
     * 下订单
     * ①参数非空校验
     * ②安全校验
     * ③黑名单校验
     * ④规则拦截
     * */
    public static void main(String[] args) {
        Order order = new Order();
        try {
            order.checkNullParam(new Object());
            order.checkSecurity();
            order.checkBackList();
            order.checkRule();
            System.out.println("order success");
        } catch (RuntimeException e) {
            System.out.println("order fail");
        }
    }
}
